home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 2053_disk_manpage.txt < prev    next >
Text File  |  1995-10-13  |  7KB  |  167 lines

  1.  
  2.  
  3. DISK(8)             UNIX Programmer's Manual          DISK(8)
  4.  
  5. NAME
  6.      disk - disk initialization and diagnosis
  7.  
  8. SYNOPSIS
  9.      /usr/etc/disk [ option flags ] [ action flags ] raw-device
  10.  
  11. DESCRIPTION
  12.      The disk utility program can be used to initialize, inspect,
  13.      repair, and configure optical, floppy and SCSI disks.
  14.  
  15.      The option flags are used with the -i action flag to specify
  16.      certain parameters when initializing a disk:
  17.  
  18.      -h hostname
  19.            Specifies a hostname to be stored in the disk
  20.            label.  The actual hostname of a machine is not
  21.            determined by the disk label, but in the case of
  22.            removable optical media this field may be set for
  23.            informational purposes to indicate which machine
  24.            the disk belongs to.
  25.  
  26.      -l labelname
  27.            The labelname of a disk is printed in the message
  28.            log when the system boots.  For optical media this
  29.            is also the name used as the mount point in the /
  30.            directory when the disk is automounted.
  31.  
  32.      -t disk_type
  33.            The disk configuration information in /etc/disktab
  34.            is named by an identifier called the disk type. By
  35.            default, when the disk program is run it will
  36.            attempt to determine the proper disk type to use.
  37.            Use this flag to override the default.  This is
  38.            used to reinitialize a disk using a different set
  39.            of configuration parameters from /etc/disktab
  40.            (e.g. a different number and/or size of filesystem
  41.            partition(s)).
  42.  
  43.      The action flags are used to perform a specific command in
  44.      the disk program (only one may be specified):
  45.  
  46.      -i        This flag will initialize a disk including writing
  47.            out a new disk label containing information about
  48.            the host name, label name and information found in
  49.            /etc/disktab. A boot program will be installed
  50.            onto the boot block area of the disk from the file
  51.            /usr/standalone/boot. If specified in the confi-
  52.            guration information in /etc/disktab, the initial-
  53.            ize flag will also build empty UNIX filesystems on
  54.            the disk.  The initialize flag will destroy all
  55.            data on the disk.  WARNING: Don't initialize a
  56.            mounted device.    Example: "/etc/disk -h myhost -l
  57.            mydisk -i /dev/rod0a"
  58.  
  59.      -e        This flag will eject ejectable media.  No attempt
  60.            is made to unmount the filesystems on this disk
  61.            before ejecting.
  62.  
  63.      -b        The boot program in /usr/standalone/boot will be
  64.            written onto the boot block area of the disk.
  65.  
  66.      -B        Same as -b, except that it takes as an argument
  67.            the pathname of the file containing data to be
  68.            written onto the boot block area of the disk.
  69.  
  70.      -p partitionsize
  71.            The first partition of a two-partition disk will
  72.            be partitionsize, and the second partition uses
  73.            the remainder of the disk.  The partitionsize is
  74.            in units of the native blocksize of the device
  75.            (minimum 1K).  The -p option only has meaning when
  76.            used with -i.
  77.  
  78.      -q        The default disk type information returned by the
  79.            device driver for this disk will be printed.  This
  80.            flag is used by the Builddisk application to
  81.            determine what kind of disk is present.
  82.  
  83.      -s        If the device driver keeps any special statistics
  84.            for the disk they will be printed with this flag.
  85.  
  86.      -F        This flag formats the disk.
  87.  
  88.      -H hostname
  89.            This flag can be used to change the hostname field
  90.            of the disk label without disturbing other fields
  91.            in the label.
  92.  
  93.      -L labelname
  94.            This flag can be used to change the labelname
  95.            field of the disk label without disturbing other
  96.            fields in the label.
  97.  
  98.      If no action flags are specified the program operates in an
  99.      interactive mode.    In interactive mode type the interrupt
  100.      character at any time to abort the current command.  Typing
  101.      '?' will list the available commands.  Many of the commands
  102.      will prompt for additional arguments or sub-commands.  There
  103.      are many interactive commands in addition to the ones
  104.      described by the option flags above:
  105.  
  106.      read, write, verify, rw, rwr
  107.            These commands will read, write and verify data on
  108.            the disk.  All block numbers used in these com-
  109.            mands are absolute disk block numbers and do not
  110.            correspond to block numbers reported from the
  111.            filesystem.  No bad sector forwarding or additions
  112.            are performed with these commands.  On an optical
  113.            disk, these commands can be used to write a sector
  114.            that has become unreadable due to an uncorrectable
  115.            ECC errors.  WARNING: These commands may destroy
  116.            disk data.
  117.  
  118.      look, set These commands may be used to inspect and modify
  119.            the data buffers used in the read and write com-
  120.            mands described above.
  121.  
  122.      abort     This command toggles whether an error will stop
  123.            the read and write commands described above.
  124.  
  125.      label     This command is used to print and change informa-
  126.            tion in the disk label.    To change only the host-
  127.            name or labelname fields use the -H hostname or -L
  128.            labelname action flags described earlier.
  129.  
  130.      bad       Use this command to display and edit the bad block
  131.            table maintained on optical disks.
  132.  
  133.      bitmap    Use this command to display and edit the sector
  134.            status bitmap maintained on optical disks.
  135.  
  136.      scan      The scan command sequentially searches the disk
  137.            for file system super blocks and prints the file
  138.            system block number where they are found.  This
  139.            information is essential if the primary super
  140.            block of a file system is damaged and one needs to
  141.            specify an alternate super block location to the
  142.            file system check program fsck but one does not
  143.            know which block number to specify.  (e.g. "fsck
  144.            -bnnn /dev/rod0a" where "nnn" is the block number
  145.            of the alternate super block).  A list of these
  146.            block numbers is produced when a file system is
  147.            initialized with the newfs command, but this list
  148.            usually isn't around when needed.
  149.  
  150. FILES
  151.      /etc/disktab     for disk geometry and partition layout
  152.              information
  153.  
  154.      /usr/standalone/boot
  155.              the default program written onto the
  156.              boot block area
  157.  
  158. SEE ALSO
  159.      disktab(5)
  160.  
  161. BUGS
  162.      Like all low-level diagnostics written early in the life of
  163.      a new computer, this program exhibits evolutionary develop-
  164.      ment.  Some features may be difficult to understand or not
  165.      work exactly as advertised.
  166.  
  167.